<?php
class Template_admin extends Controller
{

    function index()
    {
        $this->load->library('session');

        if (array_key_exists("username",$this->session->all_userdata()))
        {
            $username = $this->session->all_userdata()["username"];
            $es_administrador =  $this->session->all_userdata()["es_administrador"];
            $es_operador =  $this->session->all_userdata()["es_operador"];

            if ($es_administrador)
            {
                $data['main_content'] = 'admin_template';
                $data['username'] = $username;
                $this->load->view('admin_template', $data);
            }
        }
    }


}